home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-11 | 5.7 KB | 138 lines | [TEXT/ttxt] |
-
- MacStarter_Pascal, Version 1.0,
- released December 1993.
-
- by: David J. Eck
- Department of Mathematics
- Hobart and William Smith Colleges
- Geneva, NY 14456
-
- E-mail: eck@hws.bitnet
-
-
-
- This READ ME file is part of MacStarter_Pascal, an
- application shell for writing Macintosh applications
- ranging from very quick-and-dirty to moderately
- complex, using THINK Pascal 4.0. It uses the
- object-oriented features of THINK Pascal to
- implement windows with the standard Macintosh
- behavior. The windows can contain "decorations"
- such as buttons and text-input boxes. A lot of
- comments are included in the source files, and the
- source code for several simple applications is
- included. Also included (and usable separately from
- the rest of the shell) is a sophisticated unit for
- working with mathmatical expressions such as "x^2+7"
- and "sin(2*x)"; the unit includes procedures for
- parsing and evaluating such expresssions. One of
- the sample applications shows how this unit can be
- used in a function-graphing application.
-
- Of course, THINK Pascal comes with a very
- sophisticated application shell, the THINK Class
- Library, but that is hard to learn and is really not
- appropriate for small, short projects that don't
- need all the bells and whistles. I wrote
- MacStarter_Pascal for my own use and have used it to
- write about a half-dozen reasonably serious programs
- and to knock off a few small utility programs. It is
- not perfect, and I expected to do more work on it
- before giving it away to other programmers, but
- circumstances are forcing me to switch (unwillingly)
- a lot of my programming to C and C++, and I don't
- expect that I will ever get around to making major
- revisions. Furthermore, two other people have used
- it and encouraged me to circulate it more widely.
- So, here it is. I would be happy to receive and
- respond to any comments.
-
- By the way, the name I use for my basic window
- class, xWindow, was chosen befor I ever heard of
- X Windows, and has nothing to do with it. (It's a
- weak wordplay on "Eck's Window".)
-
-
- --------------------------------------------------------
-
- Here is what you get in the MacStarter_Pascal
- package:
-
- (1) generic.π is a THINK Pascal 4.0 project file
- that you can use as a starting point for your
- applications. It uses the Pascal source file
- applicationProcs.p, the resource file generic.rsrc,
- and several source files from the folder "xWindows
- definitions files". A good place to start would be
- to open this project, run the program, and start
- reading some of the source files it includes.
- The first thing to read is applicationProcs.p;
- this file includes some instructions for creating
- applications. (Other sample applicationProcs
- files contain more instructions and hints.)
-
- (2) applicationsProcs.p and noCommentsProcs.p are two
- versions of the same UNIT, one with lots of comments
- and one with all the comments removed (because they
- quickly get annoying). For small, quick-and-dirty
- programs, all you will do is modify one of these
- files (saving a copy of the original, of course),
- and use it with generic.π and generic.rsrc.
- For more sophisticated programs, you will probably
- want to add units and modify resources. In that case,
- you should probably create a new project folder and
- start by copying generic.π, generic.rsrc and
- noCommentsProcs.p into that folder. (Or, copy
- an existing folder like "Text Window starter".)
-
- (3) generic.rsrs is the resource file for use with the
- project generic.π
-
- (4) Text Window starter is a project folder for a simple
- text-editing application. It can save, open and
- print text files. This can be a starting point for
- interesting applications. (I have written several.
- If you want to use file types and icons with your
- program, you will have to modify the resource file
- and also create a custom version of the file
- xTextFileWindow.p to work with your file type.)
-
- (5) applicationProcs.calc is a modified version of the
- file noCommentProcs.p for a very simple calculator
- program. The file includes instructions for how to
- use it with generic.π. This illustrates use of
- text windows, radio button groups, default buttons
- and text-input boxes.
-
- (6) TextReaderExample ƒ is a project folder that provides
- another sample program, including the use of a
- TextReader class that can be used to get convenient
- access to the text in a text window.
-
- (7) simpleGraph example ƒ is the last sample project
- folder. This one illustrates the use of the
- "expresssion" unit for parsing and evaluating
- mathematical expressions. It also illustrates the
- definition of a new decoration type, this one for
- displaying the graph of a function.
-
- (8) The folder "xWindows definitions files" contains all
- the source files used in the generic application
- project and in the other sample projects (plus one,
- xListDecoration.p, that isn't used in any of the
- samples). The most fundamental files are: xWindow.p,
- xControlDecoration.p, xInputDecoration.p, xTextWindow,
- xTextFileWindow.p, TextPrint.p and StandardMain.p.
- All these files have been used in a number of programs
- and should be reasonably well debugged. The files
- xFigureDecoration.p, xScaledGraphicsDecoration.p,
- xExpression.p, xExpressionInput.p, xListDecoration.p,
- TextReader.p and "Main w/ suspend.p" were written
- for specific purposes, for which they work; but some
- of them were written with lots of extra bells and whistles
- that have not been adequately tested. All thes files have
- a lot of comments. (Only the interface sections of
- the UNITS are commented; you shouldn't ever need
- to look at the implementation sections.)
-
-